//
//  RBPlaygroundVC.m
//  zhongzhenglu
//
//  Created by XL on 2022/7/19.
//

#import "RBPlaygroundVC.h"
#import <Masonry.h>

@interface RBPlaygroundVC ()

@end

@implementation RBPlaygroundVC

#pragma mark - Lifecycle

- (void)viewDidLoad
{
    [super viewDidLoad];
    [self setup];
}

#pragma mark - Private

- (void)setup
{
    UIImageView *imgView = UIImageView.new;
    imgView.backgroundColor = UIColor.redColor;
    [self.view addSubview:imgView];
    [imgView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(100);
        make.left.mas_equalTo(22);
        make.width.height.mas_equalTo(66);
    }];
    
    UILabel *nameL = UILabel.new;
    nameL.textColor = UIColor.blackColor;
//    nameL.text = @"JACK";
    nameL.text = @"make.left.mas_equalTo(imgView.mas_right).offset(22);";
    [self.view addSubview:nameL];
    [nameL mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(imgView.mas_right).offset(22);
        make.centerY.mas_equalTo(imgView);
    }];
    
    UILabel *timeL = UILabel.new;
    timeL.text = @"2022-12-23";
    timeL.font = [UIFont systemFontOfSize:13];
    timeL.textColor = UIColor.grayColor;
    [self.view addSubview:timeL];
    [timeL mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(nameL.mas_right).offset(22);
        make.right.mas_equalTo(-22);
        make.centerY.mas_equalTo(imgView);
    }];
    
    [timeL setContentHuggingPriority:UILayoutPriorityDefaultHigh+1 forAxis:UILayoutConstraintAxisHorizontal];
    [timeL setContentCompressionResistancePriority:UILayoutPriorityDefaultHigh+1 forAxis:UILayoutConstraintAxisHorizontal];
}

#pragma mark - Network

#pragma mark - Event

#pragma mark - Setter

#pragma mark - Getter

@end
